import Vue from 'vue'
import Vuex from 'vuex'
import book from './module/book'
import getters from './getters'

Vue.use(Vuex)

const state = {
  money: 1
}

const mutations = {
  add(state) {
    state.money++
  }
}

const actions = {
  addMoney(e) {
    e.commit('add')
  }
}

export default new Vuex.Store({
  modules: {
    book
  },
  getters,
})
